package com.zjhn.ds.config.mybatis;

/**
 * @BelongsProject: ds_jlw
 * @BelongsPackage: com.zjhn.ds.config
 * @Author: sxt
 * @CreateTime: 2023-09-09  14:12
 * @Description:
 * @Version: 1.0
 */
public class MybatisTenantContext {
    private static final ThreadLocal<Boolean> TENANT_CONTEXT_THREAD_LOCAL = new ThreadLocal<>();

    public static Boolean get() {
        return TENANT_CONTEXT_THREAD_LOCAL.get();
    }

    public static void set(boolean isIgnore){
        TENANT_CONTEXT_THREAD_LOCAL.set(isIgnore);
    }

    public static void clear(){
        TENANT_CONTEXT_THREAD_LOCAL.remove();
    }
}
